﻿package org.openChart.display 
{
	import flash.geom.Point;
	import org.openChart.meta.StickLine;
	
	/**
	 * ...
	 * @author Chongyuan
	 */
	public class DisplayStickLine extends DisplayBaseObject
	{
		private var startPosition_:Point;
		private var endPosition_:Point;
		//public var color:uint;
		private var width_:uint;
		private var broken_:Number = 0;
		
		public function DisplayStickLine( stickLine:StickLine ) 
		{
			startPosition = new Point();
			endPosition = new Point();
			this.width = stickLine.getStyle().width;
			
			super(stickLine); 
		}
		
		public function get startPosition():Point
		{
			return this.startPosition_;
		}
		
		public function set startPosition( startPosition_:Point ):void
		{
			this.startPosition_ = startPosition_;
		}
		
		public function get endPosition():Point
		{
			return this.endPosition_;
		}
		
		public function set endPosition( endPosition_:Point ):void
		{
			this.endPosition_ = endPosition_;
		}
		
		public function set width( width_:Number):void
		{
			this.width_ = width_;
		}
		
		public function get width():Number
		{
			return this.width_;
		}
		
		public function get broken():Number
		{
			return this.broken_;
		}
		
		public function set broken( broken_:Number ):void
		{
			this.broken_ = broken_;
		}
		
		public function toString():String
		{
			var str:String = "\nObject:DisplayStickLine ";
			str += "[startPosition: x = " + startPosition.x + ", y = " + startPosition.y + "]";
			str += "[endPosition: x = " + endPosition.x + ", y = " + endPosition.y + "]";
			return str;
		}
	}
	
}